import Vue from 'vue'
import App from './App.vue'
import router from './router'
import './plugins/element.js'
import './assets/css/global.css'
import axios from 'axios'
// 第三方组件 树形table
import ZkTable from 'vue-table-with-tree-grid'

Vue.component('tree-table', ZkTable)
Vue.config.productionTip = false
    // 配置根路径
axios.defaults.baseURL = 'http://127.0.0.1:8888/api/private/v1'
    //每次发送请求携带token
axios.interceptors.request.use(config => {
    //在头部挂载token
    config.headers.Authorization = sessionStorage.getItem('token');
    //返回config
    return config;
})
Vue.prototype.$http = axios
new Vue({
    router,
    render: h => h(App)
}).$mount('#app')